package jue;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class Test {
    public static void main(String[] args) {
        ExecutorService es = Executors.newFixedThreadPool(10);
        for (int k = 0; k < 10; k++) {
            es.submit(()->{
                for (int i = 0; i < 100; i++) {
                    System.out.println(Thread.currentThread().getName()+"==="+i);
                    try {
                        Thread.sleep(2);
                    } catch (InterruptedException e) {
                        e.printStackTrace();
                    }
                }
            });
        }

        es.shutdown();
    }
}
